ʹá
òΪ֡
ȽһֲSango2.exeͬһĿ¼£еһֲ
Ȼ󣬽ScriptļڵļƵȺ2ϷĿ¼¡ظ򸲸ǡ
޸зգעⱸݡ


˵
BUGͬһͬһN˳ֻ꣬ʾһ˳ϢظNΡ

ײµĳǣڵýűӦʱINTV_ATTACKER_GENERAL / INTV_DEFENDER_GENERAL / INTV_ATTACKER_KING_GENERALڽűִеص㣬ЩԱд֮ǰűδִС
ȷĿűSystem.soSearchTalkcallsignΪ5. ¼Ǹúһ֧Ψһ==20ʱΪ¼ʱintvAttackerGeneralǸףintvAttackerKingGeneralŮintvDefenderGeneralǾ
ȻȷߣSearchGeneralByBlood (423476). ϲ룬ȷʵ˶ӦλãȻóȻDoScript_1. 

֮ǰ֮󣬽ӵģʱԭ޸ķܻһֿڴµ⣬һֿǣģʱԭеķֹ̳߳ͻжϷı֤֮߳䲻ͻ
֮ܶ¸ˡ



ҪڴĻΨһİ취ָֹINTVƫơ
κѭSearchBloodGeneral_0 (423681) Сǣ㺯Ȼֻһifκһifܵ²꣬㺯֪ȥʱ򵽵ǵڼꡣһȻ뷨ʹȫֱONCE AGAIN...ﵹǿĳ̶INTVʱӦòбϹġǽűĸ߷أֻܵԸ֮಻ЩINTVʲôɧˡ
ôҲͱúˡ

ȫֳcounterintvMagicAttackValue (INTV04) 0x4A6888
̶佫intvAttackerKingGeneral (INTV09) 0x4A689C
Right-Left combinations: INTV30ʼԤĿռ64INTVӦ㹻ˡ

޸֮
1) SearchBloodGeneral_0 (423681) Ҫѭ֮ǰһֵʼȫֳcounter
ܼƺ˷һĴֵ֮neg sbb negĲΪ˽!=0жϣʵûʲô壬ֻжϡЩʡȥȻжϵøˡ

2) SearchGeneralByBlood (423476) ҪȡֵӦINTVȻĽűȻʹcallsign 10
ⲿָڿռ䣬ֱӸĶINTVֵĲּɡΪԭͨúֵģĳֱӸֵpushadd espʡȥǿȡһpKingռʵԣúܡұȡpKing߼ҲŸոպùռ䣬ⲿʡȥĻͻһnopˡ

3) ӦĽű


UE޸ݣһ֣
: 
229A1: 8B 55 FC 52 E8 38 C3 FF FF 83 C4 04 8B 45 FC 8B 88 CB 00 00 00 8B 51 0C 52 E8 16 C3 FF FF 83 C4 04 8B 45 08 50 E8 FD C2 FF FF 83 C4 04 6A 14
229D1: 05
22A8F: 8B 45 F4 25 00 00 01 00 F7 D8 1B C0 F7 D8 89 45 F8
22B1B: 01 75

Ϊ: 
229A1: B9 88 68 4A 00 8B 01 50 40 89 01 01 C0 8D 14 85 E8 68 4A 00 8B 4D 08 89 0A 8B 45 FC 89 42 04 8B 88 CB 00 00 00 8B 51 0C 89 15 9C 68 4A 00 90
229D1: 0A
22A8F: 25 00 00 01 00 89 45 F8 31 C0 A3 88 68 4A 00 90 90
22B1B: 00 74

ڶ֡
System.so£ʹá2űαv0.9.4룬ӵSystem.cppб뼴ɣ

// Main execution function
// Index indicates which children is mature. Index starts from 0. 
void function ChildGenTalkNew (int index) callsign 10 {

	// follow the original "mutual exclusion" code. 
	// In theory it shouldn't work at all. Do it anyway.
	do {
		Delay(1);
	} while(GetGlobal(1) != 0);
	SetGlobal(1, 1);

	// use INTVs after 30 to get general pointers.
	General* pChild = (General *) GetIntv(30 + index * 2);
	General* pParent = (General *) GetIntv(30 + index * 2 + 1);	
	General* pKingGeneral = (General *) intvAttackerKingGeneral;

	SetSXString(0, 3, GetGeneralName(pChild));	// %S3%
	SetSXString(0, 1, GetGeneralName(pParent));	// %S1%

	// King's child
	if (pParent == pKingGeneral) {
		PromptWithMessageIndex1(0, pParent, 816);	
		PromptWithMessageIndex1(1, pChild, Rand(870, 874));
		PlaySound1("SUCCESS", 255);

		PromptWithMessageIndex1(0, pKingGeneral, Rand(875, 878));
		PromptWithMessageIndex1(1, pChild, Rand(890, 893));
		Prompt1(0, pKingGeneral, "%e");

	// Suggested by parent
	} else {
		PromptWithMessageIndex1(0, pParent, 817);
		PromptWithMessageIndex1(1, pChild, 818);
		PlaySound1("SUCCESS", 255);

		PromptWithMessageIndex1(0, pKingGeneral, Rand(894, 899));
		PromptWithMessageIndex1(1, pChild, Rand(900, 903));
		PromptWithMessageIndex1(0, pKingGeneral, 812);
		PromptWithMessageIndex1(0, pParent, Rand(904, 907));
	}

	Delay(1);
	SetGlobal(1, 0);
}
